<!DOCTYPE html>
<html>
  <head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="utf-8">
  <meta name="author" content="紫锦木">
  

  <title>MAC下开发问题集锦 | 紫锦木</title>

  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

  
  <meta name="keywords" content="PHP,mac,phpize,">
  

  
  <meta name="description" content="mac 下开发常见问题集锦，总结了我在 mac 下开发遇见的一些问题，都会记录在这里">

  

  
  <script src="//cdn.jsdelivr.net/npm/leancloud-storage@3.11.1/dist/av-min.js" async></script>
  

  
  <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML" async></script>
  

  
  <script src="//unpkg.com/valine/dist/Valine.min.js" async></script>
  

  

  <script>
  // theme-ad's config script
  // it can be used in every script
  
  window.AD_CONFIG = {
    leancloud: {"appid":"3zwI0gU7grT0MfYUEurqXnWE-gzGzoHsz","appkey":"yVgwglQXfL3vbQiSzeo1Xhqx","comment":true,"count":true},
    welcome: {"enable":false,"interval":30},
    start_time: "2019-05-01",
    passwords: ["efe07af7441da2b69c4a41e42e73be4db47f66010a56900788a458354a7373ec", ],
    is_post: true,
    lock: false,
    author: "紫锦木",
    share: {"twitter":false,"facebook":false,"weibo":true,"qq":true,"wechat":true},
    mathjax: true,
    page_type: "",
    root: "/"
  };
</script>

  <script src="/vendor/sha256.min.js"></script>
<script src="/js/auth.js"></script>
<script src="/js/index.js"></script>
<script src="/vendor/qrcode.min.js"></script>

  
  <link rel="icon" href="/images/favicon.ico">
  <link rel="apple-touch-icon" href="/images/touch-icon.png">
  

  <link href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

  <link rel="stylesheet" href="/css/index.css">
<link rel="stylesheet" href="/styles/components/highlight/highlight.css">

  
</head>
  <body>
    <header class="site-header">
  <div class="site-header-brand">
    
      <span class="site-header-brand-title">
        <a href="/">紫锦木</a>
      </span>
    
    
      <span class="site-header-brand-motto"> | 足迹👣</span>
    
  </div>
  <div class="site-header-right">
    <nav class="site-header-navigation">
      
        <a href="/" target="_self">首页</a>
      
        <a href="/archives/" target="_self">归档</a>
      
        <a href="/tags/" target="_self">标签</a>
      
        <a href="/categories/" target="_self">分类</a>
      
        <a href="/friends/" target="_self">友链</a>
      
        <a href="/about/" target="_self">关于</a>
      
    </nav>
    <div class="site-header-btn">
      
        <a href="https://github.com/xfjpeter/" target="_blank" id="site-github">
          <i class="fa fa-github-alt"></i>
        </a>
      
      <a href="javascript:void(0);" id="site-search">
        <i class="fa fa-search"></i>
      </a>
      <a href="javascript:void(0);" id="site-nav-btn">
        <i class="fa fa-ellipsis-v"></i>
      </a>
    </div>
  </div>
</header>
<nav class="table-content" id="site-nav">
  <div class="table-content-title">
    <span>导航</span>
  </div>
  <div class="table-content-main">
    <ol class="toc">
      
        <li class="toc-item">
          <a href="/" target="_self">
            首页
          </a>
        </li>
      
        <li class="toc-item">
          <a href="/archives/" target="_self">
            归档
          </a>
        </li>
      
        <li class="toc-item">
          <a href="/tags/" target="_self">
            标签
          </a>
        </li>
      
        <li class="toc-item">
          <a href="/categories/" target="_self">
            分类
          </a>
        </li>
      
        <li class="toc-item">
          <a href="/friends/" target="_self">
            友链
          </a>
        </li>
      
        <li class="toc-item">
          <a href="/about/" target="_self">
            关于
          </a>
        </li>
      
    </ol>
  </div>
</nav>
<div id="site-process"></div>
    <main>
      
  <div class="passage">
  <div class="passage-meta">
    <span>
      <i class="fa fa-calendar"></i>2019-06-06
    </span>
    
      <span>
        | <a href="/categories/PHP/"><i class="fa fa-bookmark"></i>PHP</a>
      </span>
    
    
      <span>
        | <i class="fa fa-unlock-alt"></i>UNLOCK
      </span>
    
  </div>
  <h1 class="passage-title">
    MAC下开发问题集锦
  </h1>
  
  <article class="passage-article">
    <blockquote>
<p>mac 下开发常见问题集锦，总结了我在 mac 下开发遇见的一些问题，都会记录在这里</p>
</blockquote>
<h2 id="mac-下phpize错误"><a href="#mac-下phpize错误" class="headerlink" title="mac 下phpize错误"></a>mac 下<code>phpize</code>错误</h2><p><strong>问题</strong></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">phpize</span><br><span class="line">grep: /usr/include/php/main/php.h: No such file or directory</span><br><span class="line">grep: /usr/include/php/Zend/zend_modules.h: No such file or directory</span><br><span class="line">grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory</span><br><span class="line">Configuring <span class="keyword">for</span>:</span><br><span class="line">PHP Api Version:</span><br><span class="line">Zend Module Api No:</span><br><span class="line">Zend Extension Api No:</span><br></pre></td></tr></table></figure>
<p><strong>解决方案</strong></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include /usr/include</span><br><span class="line"></span><br><span class="line"><span class="comment"># MacOSX10.14.sdk 说明：10.14指的是你的mac的版本号，最好去看一下该路径存在不</span></span><br></pre></td></tr></table></figure>
<p><strong>参考地址</strong></p>
<p><a href="https://blog.csdn.net/json_vip/article/details/53192585" target="_blank" rel="noopener">https://blog.csdn.net/json_vip/article/details/53192585</a></p>
<h2 id="mac-下显示任何来源"><a href="#mac-下显示任何来源" class="headerlink" title="mac 下显示任何来源"></a>mac 下显示<code>任何来源</code></h2><p><strong>问题</strong></p>
<blockquote>
<p>在“系统偏好设置”=&gt;“安全性与隐私”=&gt;没有“任何来源”</p>
</blockquote>
<p><strong>解决方案</strong></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 在终端运行</span></span><br><span class="line">sudo spctl --master-disable</span><br></pre></td></tr></table></figure>
<p><strong>参考地址</strong></p>
<p><a href="https://jingyan.baidu.com/article/afd8f4de8e55e734e286e92a.html" target="_blank" rel="noopener">https://jingyan.baidu.com/article/afd8f4de8e55e734e286e92a.html</a></p>
<h2 id="安装swoole找不到-openssl"><a href="#安装swoole找不到-openssl" class="headerlink" title="安装swoole找不到 openssl"></a>安装<code>swoole</code>找不到 openssl</h2><p><strong>问题</strong></p>
<blockquote>
<p>openssl/ssl.h file not found mac</p>
</blockquote>
<p><strong>解决方案</strong></p>
<ol>
<li>首先，确定自己是否真的有安装 openssl：<code>brew install openssl</code>，根据提示可以自己看到结果或者用<code>brew info openssl</code>也可以找到安装位置</li>
<li>在 <code>/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/</code>中添加 openssl 文件夹</li>
<li>拷贝 include/openssl 下面的所有文件至第二步中建立的 openssl 文件夹中</li>
</ol>
<p><strong>参考地址</strong></p>
<p><a href="https://blog.csdn.net/qq_35007834/article/details/84566212" target="_blank" rel="noopener">https://blog.csdn.net/qq_35007834/article/details/84566212</a></p>
<h2 id="让-iTrem-2-zsh-启动不再等待！"><a href="#让-iTrem-2-zsh-启动不再等待！" class="headerlink" title="让 iTrem 2 + zsh 启动不再等待！"></a>让 iTrem 2 + zsh 启动不再等待！</h2><p><strong>问题</strong></p>
<blockquote>
<p>item 启动的时候太慢</p>
</blockquote>
<p><strong>解决方案</strong></p>
<ul>
<li>进入 iTerm2 的偏好设置里，在 Profiles 里编辑你的配置，在配置右侧的 General 选项卡里，Command 里选择为 Command，然后里边写入 <code>/usr/bin/login -pfq xxx</code> 其中 xxx 是你的用户名。</li>
</ul>
<p><img src="/images/配置.png" alt="配图"></p>
  </article>
  <aside class="table-content" id="site-toc">
  <div class="table-content-title">
    <i class="fa fa-arrow-right fa-lg" id="site-toc-hide-btn"></i>
    <span>目录</span>
  </div>
  <div class="table-content-main">
    <ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#mac-下phpize错误"><span class="toc-text">mac 下phpize错误</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#mac-下显示任何来源"><span class="toc-text">mac 下显示任何来源</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#安装swoole找不到-openssl"><span class="toc-text">安装swoole找不到 openssl</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#让-iTrem-2-zsh-启动不再等待！"><span class="toc-text">让 iTrem 2 + zsh 启动不再等待！</span></a></li></ol>
  </div>
</aside>
  
    <aside class="passage-copyright">
      <div>本文作者: 紫锦木</div>
      
        <div>
          原文链接: 
          <a href target="_blank">https://www.xfjpeter.cn/articles/ck2btyva50000swxx8eqz6zbu.html</a>
        </div>
      
      <div>
        版权声明: 本博客所有文章除特别声明外, 均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a> 许可协议. 转载请注明出处!
      </div>
    </aside>
  
  
    <div class="passage-tags">
     
      <a href="/tags/mac/"><i class="fa fa-tags"></i>mac</a>
     
      <a href="/tags/phpize/"><i class="fa fa-tags"></i>phpize</a>
    
    </div>
  
</div>

    </main>
    
      
<div class="site-comment-contanier" data-plateform="leancloud">
  
    <p id="site-comment-info">
      <i class="fa fa-spinner fa-spin"></i> 评论加载中
    </p>
    <div id="site-comment"></div>
  
</div>
    
    <div class="site-footer-wrapper">
  <footer class="site-footer">
    
    
    <div class="site-footer-col">
      <h5 class="site-footer-title">博客推荐</h5>
      
      <span class="site-footer-item">
        <a href="https://godbmw.com/" target="_blank">GodBMW</a>
      </span>
      
      <span class="site-footer-item">
        <a href="http://ruanyifeng.com/" target="_blank">阮一峰的个人网站</a>
      </span>
      
    </div>
    
    <div class="site-footer-col">
      <h5 class="site-footer-title">抓到我</h5>
      
      <span class="site-footer-item">
        <a href="https://juejin.im/user/5b4ffe335188251afa62cd8a" target="_blank">掘金</a>
      </span>
      
      <span class="site-footer-item">
        <a href="https://segmentfault.com/u/johnxu_58f42b627331b" target="_blank">思否</a>
      </span>
      
      <span class="site-footer-item">
        <a href="https://www.jianshu.com/u/56f6d0e3bae3" target="_blank">简书</a>
      </span>
      
    </div>
    
    
    <div class="site-footer-info">
      <i class="fa fa-clock-o"></i> 本站已稳定运行<span id="site-time"></span>
    </div>
    
    <div class="site-footer-info">
      <i class="fa fa-paw"></i> 您是本站第 <span id="site-count"></span> 位访客
    </div>
    
    
    <div class="site-footer-info">
      <i class="fa fa-at"></i> Email: fsyzxz@163.com
    </div>
    
    <div class="site-footer-info">
      <i class="fa fa-copyright"></i>
      2019 <a href="https://github.com/dongyuanxin/theme-ad/" target="_blank">Theme-AD</a>.
      Created by <a href="https://godbmw.com/" target="_blank">GodBMW</a>.
      All rights reserved.
    </div>
  </footer>
</div>
    <div id="site-layer" style="display:none;">
  <div class="site-layer-content">
    <div class="site-layer-header">
      <span class="site-layer-header-title" id="site-layer-title"></span>
      <i class="fa fa-close" id="site-layer-close"></i>
    </div>
    <div class="site-layer-body" id="site-layer-container">
      <div class="site-layer-input" id="site-layer-search" style="display: none;">
        <input type="text">
        <i class="fa fa-search"></i>
      </div>
      
        <div class="site-layer-reward" id="site-layer-reward" style="display: none;">
          
            <div>
              <img src="/images/wechat.png" alt="WeChat">
              
                <p>WeChat</p>
              
            </div>
          
            <div>
              <img src="/images/alipay.png" alt="AliPay">
              
                <p>AliPay</p>
              
            </div>
          
        </div>
      
      <div id="site-layer-welcome" style="display:none;"></div>
    </div>
  </div>
</div>
    

<div class="bottom-bar">
  <div class="bottom-bar-left">
    <a href="/articles/ck2btyvah000aswxx100h47ly.html" data-enable="true">
      <i class="fa fa-arrow-left"></i>
    </a>
    <a href="/articles/ck2btyvae0006swxx8wq89vyr.html" data-enable="true">
      <i class="fa fa-arrow-right"></i>
    </a>
  </div>
  <div class="bottom-bar-right">
    <a href="javascript:void(0);" data-enable="true" id="site-toc-show-btn">
      <i class="fa fa-bars"></i>
    </a>
    
      <a href="#site-comment" data-enable="true">
        <i class="fa fa-commenting"></i>
      </a>
    
    <a href="javascript:void(0);" id="site-toggle-share-btn">
      <i class="fa fa-share-alt"></i>
    </a>
    
      <a href="javascript:void(0);" id="site-reward">
        <i class="fa fa-thumbs-up"></i>
      </a>
    
    <a href="javascript:void(0);" id="back-top-btn">
      <i class="fa fa-chevron-up"></i>
    </a>
  </div>
</div>
    <div id="share-btn">
  
  
  
    <a id="share-btn-weibo" href="javascript:void(0);" target="_blank">
      <i class="fa fa-weibo"></i>
    </a>
  
  
    <a id="share-btn-qq" href="javascript:void(0);" target="_blank">
      <i class="fa fa-qq"></i>
    </a>
  
  
    <a id="share-btn-wechat" href="javascript:void(0);" target="_blank">
      <i class="fa fa-wechat"></i>
    </a>
  
</div>
    


  <script async>
  (function(){
      var bp = document.createElement('script');
      var curProtocol = window.location.protocol.split(':')[0];
      if (curProtocol === 'https') {
          bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
      }
      else {
          bp.src = 'http://push.zhanzhang.baidu.com/push.js';
      }
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(bp, s);
  })();
  </script>




    
  </body>
</html>